import ByCol from "@/components/ui/ByCol";
import ByRow from "@/components/ui/ByRow";
import { formatTimeElapsed, getTimeDiffFromNow } from "@/utils";
import { View } from "@tarojs/components";

export default () => {

  const list = ["1745576049", "1745575358", "1745508768", "1745485916"]


  function formatData({ day, hour, minute }) {
    let dayText = day ? day + "天" : ""
    let hourText = hour ? hour + "时" : ""
    let minuteText = hour ? hour + "分钟" : ""


  }


  const renderList = list.map((e) => {
    return {
      val1: getTimeDiffFromNow(e),
      val2: formatTimeElapsed(e),
    }
  })

  return <View>

    {
      renderList.map(item => (
        <ByRow>

          <ByCol span={6}>{item.val2}</ByCol>
        </ByRow>
      ))
    }

  </View>;
};
